package obj_.System;

import java.util.Arrays;

public class demo01 {
    public static void main(String[] args) {

        method02();
    }

    private static void method02() {
        int[] arr1 = {1,2,3,4,5,6};
        int[] arr2 = {7,8,9,10,11,12};
        System.arraycopy(arr1,3,arr2,0,3);
        //用这个方法把arr1指定的位置复制到arr2的指定位置中去
        System.out.println(Arrays.toString(arr2));//[1, 2, 3, 4, 5]

    }

    private static void method01() {
        long l = System.currentTimeMillis();
        for (int i = 0; i < 9999; i++) {
            System.out.println(i);
        }
        long l1 = System.currentTimeMillis();
        System.out.println("用时：" + (l1 - l) + "毫秒");
    }
}
